package cn.fzkj.gulimall.auth.strategy.login;

import cn.fzkj.gulimall.auth.entity.base.SocialUser;
import cn.fzkj.gulimall.auth.enums.LoginType;
import cn.fzkj.gulimall.auth.exception.UnsupportedLoginTypeException;

/**
 * @DESCRIPTION
 * @Author yaya
 * @DATE 2022/8/27
 */
public interface LoginStrategy {

    /**
     * 通过用户授权码获取访问令牌
     * @param code
     */
    default SocialUser getUserInfo(String code){
        throw new UnsupportedLoginTypeException();
    };

    LoginType supportType();
}
